public class MulOp extends ArithmeticOp
{
	public MulOp() {
		super("*");
	}
	@Override
	public STO calculate(ConstSTO left, ConstSTO right) {
		ConstSTO sto;
		if(left.getType().isInt() && right.getType().isInt()) {
			sto = new ConstSTO((left.getName() + "*" + right.getName()), new IntType(), 
				  Integer.toString(left.getIntValue() * right.getIntValue()));
		}
		else {
			sto = new ConstSTO((left.getName() + "*" + right.getName()), new FloatType(), 
					  Double.toString(left.getFloatValue() * right.getFloatValue()));
		}
		return sto;
	}
	
	@Override
	public boolean isMulOp() {
		return true;
	}
}
